package com.zb.service.impl;

import java.util.List;

import com.zb.dao.PartsDao;
import com.zb.dao.impl.PartsDaoImpl;
import com.zb.entity.Parts;
import com.zb.service.PartsService;
import com.zb.util.PageUtil;

public class PartsServiceImpl implements PartsService{
	private PartsDao p=new PartsDaoImpl();
	public PageUtil<Parts> getPartsPage(int index, int size, String name, int msi) {
		List<Parts>data=p.getMsiPage(index, size, name, msi);
		int count=p.getCount(name, msi);
		PageUtil<Parts>page=new PageUtil<Parts>();
		page.setCount(count);
		page.setData(data);
		page.setIndex(index);
		page.setSize(size);
		
		return page;
	}

}
